﻿using Microsoft.Extensions.Primitives;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Zocono.WCS.Infrastructure.ApllicationDto.DtoWcsManage
{
    public class RunLogInfoDto : PageResultDto
    {
        public long RLogId { get; set; }
        public string Js_ID { get { return RLogId.ToString(); } }

        /// <summary>
        /// Desc:托盘条码
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string ContainerBarcode { get; set; }

        /// <summary>
        /// Desc:设备号
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string EquipmentCode { get; set; }

        /// <summary>
        /// Desc:日志信息
        /// Default:
        /// Nullable:False
        /// </summary>           
        public string RunLog { get; set; }
        /// <summary>
        /// 业务类型
        /// </summary>
        public string RunType { get; set; }

        /// <summary>
        /// Desc:创建时间
        /// Default:
        /// Nullable:False
        /// </summary>           
        public DateTime CreateTime { get; set; }

        private const string DATE_STRING_FORMAT = "yyyy-MM-dd HH:mm:ss";
        private readonly DateTime defaultTime = new DateTime(1900, 1, 1);

        public string CreateTimeFormat
        {
            get
            {
                if (CreateTime <= defaultTime)
                {
                    return "";
                }

                return CreateTime.ToString(DATE_STRING_FORMAT);
            }
        }

        public string StarTime { get; set; }
        public string EndTime { get; set; }
    }
}
